#ifndef FUNCS_H
#define FUNCS_H

// Updates the incarnation number in the stable storage
// Returns 0 upon success, -1 on failure
int updateIncarnation(unsigned int i);
// Returns the incarnation number as stored in the stable storage
int getIncarnation();
// Increments incarnation number without releasing lock
int incrementIncarnation();

// randomSuccess returns true with the chance of 
// 'prob' and else otherwise. 
// 'prob' should be a PERCENTAGE
// If you want a probability of success
// of 84% you then prob should be 84

bool randomSuccess(int prob);


// Returns a random ascii character
char randChar();

#endif
